home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / util / wb / QuickLens.lha / qlens / table.rexx < prev   
OS/2 REXX Batch file  |  2001-03-25  |  956b  |  42 lines

  1. /* Calculate QLens' tables */
  2. say "TableZ2"
  3. do n.3=0 to 3
  4.   do n.2=0 to 3
  5.     do n.1=0 to 3
  6.       do n.0=0 to 3
  7.         hex="    dc.w    $"
  8.         do n=3 to 0 by -1
  9.           if bittst(n.n,1) then if bittst(n.n,0) then hex=hex"F"
  10.                                                  else hex=hex"C"
  11.                            else if bittst(n.n,0) then hex=hex"3"
  12.                                                  else hex=hex"0"
  13.         end
  14.         say hex
  15.       end
  16.     end
  17.   end
  18. end
  19. say "TableZ4"
  20. do n.7=0 to 1
  21.   do n.6=0 to 1
  22.     do n.5=0 to 1
  23.       do n.4=0 to 1
  24.         do n.3=0 to 1
  25.           do n.2=0 to 1
  26.             do n.1=0 to 1
  27.               do n.0=0 to 1
  28.                 hex="    dc.l    $"
  29.                 do n=7 to 0 by -1
  30.                   if bittst(n.n,0) then hex=hex"F"
  31.                                    else hex=hex"0"
  32.                 end
  33.                 say hex
  34.               end
  35.             end
  36.           end
  37.         end
  38.       end
  39.     end
  40.   end
  41. end
  42.